home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wildcat Gold - The Optical BBS
/
Wildcat Gold - The Optical BBS (The Golden ROM Series)(Volume 4 Number 1)(The Digital Publishing Company)(1992).ISO
/
sdn
/
taskmst.sdn
/
TM480.EXE
/
TMMANUAL.EXE
/
PRINTSCR.TSK
< prev
next >
Wrap
Text File
|
1991-09-10
|
11KB
|
425 lines
; Title : PRINTSCR.TSK Last Updated : September 5, 1991
; Author : Steve Johnson - FmP. Version : 1.20
; Purpose : Selective On-line SCR manual print facility
; Notes : Can suppress blank lines.
; : Requires IBM Graphics printer emulation to print.
; : Form names were captured from SCR output into a file.
; : checks for sufficient disc space at start and during run.
; : popups are used so as to obviate need to switch forms files.
; : during run.
; version 1.20
; : No longer uses popups
; : Can now strip out 'non-printable' characters
; version 1.10
; : Optional use of form-feeds
define pages,1
hexvar beep,07
hexvar crlf,0d0a
hexvar esc,1b
hexvar line_23,c8cd
hexvar vbar,ba
int count
int xcount
int line
int lines_this_page
int saftey
int toapage
logical last_was_spaces
logical form_feeds
logical next_menu
logical partial
logical proceed
logical quit
logical skip
logical suppress
logical no_translate
var quote,1,'"'
var menu_formnames,14,occurs 10,
'MAIN '
'M0 '
'M1 '
'M2 '
'M3 '
'M4 '
'M5 '
var formindex,14,occurs70,
'USER_INTERFACESYMBOLS MAIN FLAGS OPTIONS '
'INVOCATION FILENAMES IN-LINE COLOURS BACKGROUND '
'FOREGROUND GRAPHICS FLASHING INSERTING M0 '
'ALPHA ACCEPTFK BANNER BBMENU BBIMENU '
'BORDER BRIGHT M1 COLOUR DATE '
'DIM DEFAULTS DF DOUBLE DRAW '
'END M2 FILENAME GOFF GON '
'HEADING LIST LOGICAL MAP M3 '
'MENU NF NUMBER OVERLAY PATH '
'PRINTER M4 RANGE REPEAT SINGLE '
'SOFT SPACES STRING TIME M5 '
'TRANSLATE USERLINE VIDEO WINDOW '
var act_space,12
var min_space,12,' 120000' ;disc space warning limit at start
var work_space,12,' 2500';disc space warning limit 2500 bytes
var char,1
var formname,14
var last_line,80
var lines_per_page,2
var name,8,'PRINTSCR'
var null,1
var s_line,90
var screen,80,occurs24
var space_line,80
var spaces_78,78
var translations,1,occurs 5
hexvar unprin_table,18191b1a11
var unprintable,1,occurs 5
vconst attn,79
vconst brite,41
vconst cls,11 ;Clear screen
end
enable ctrl_c
clear spaces_78
forms logon.ovr
lookfor printscr.ovr
if not found
insert name name
put "NO_FORMS"
stop
fi
move unprin_table to unprintable
forms printscr.ovr
dspace
move display to act_space
if act_space < min_space
put space_warn
get proceed
if not proceed
stop
fi
fi
put manprint
if anyfk
stop
fi
get suppress lines_per_page form_feeds
put graph
if funkey = 10
stop
fi
move fk2 to no_translate
if not fk2
until xcount = 6
get entry xcount of translations
fi xcount
clear xcount
fi
lookfor scrman.ovr
if not found
put 'NO_TMMAN'
stop
fi
move lines_per_page to saftey
move lines_per_page to toapage
subtract 24 from saftey
forms scrman.ovr
behave 3 'SCRMAN.MAN'
until count = 75
move entry count of formindex to formname
trim formname
inkey
if key
screen 1
forms printscr.ovr
screen 0
put break-in
get char
upper char
screen 1
forms scrman.ovr
screen 0
if char = 'Y'
move true to quit
move true to partial
fi
fi
if formname = null or quit
behave 0
display cls
cursor 12 25 'Your manual is called SCRMAN.MAN'
cursor 13 25 'View with LIST? Answer Y or N '
inkey char
upper char
if char = 'Y'
move true to hide
run 'LIST SCRMAN.MAN'
fi
display cls
cursor 12 15 'Your manual is ready for printing in SCRMAN.MAN'
if partial
cursor 13 15 'Length ' pages ' pages (Extract only)'
else
cursor 13 15 'Length ' pages ' pages (Contains full listing)'
fi
stop
fi
clear skip
find menu_formnames sw formname
if found
move 8000h to bbmask
put formname nodata noclear
userline brite attn 'Press <return> (or wait 5 seconds) to print this section, <esc> to skip'
display beep
wait 5
clear next_menu
if keyval = esc and key
move true to partial
increment count
until next_menu or formname = null
move entry count of formindex to formname
trim formname
if formname ne null
find menu_formnames sw formname
fi
move found to next_menu
fi count
decrement count count
move true to skip
else
if lines_this_page ne 0
increment pages
if form_feeds
data ^l crlf
else
until lines_this_page >= toapage
data crlf
fi lines_this_page
fi
clear lines_this_page
fi
userline brite attn 'Printing ' formname '... Press any key to break-in'
fi
else
move 1 to timer
put formname wait 0 noclear
userline brite attn 'Printing ' formname '... Press any key to break-in'
fi
if not skip
clear line
until line = 24
clear s_line
scanvid line giving s_line
move s_line to entry line of screen
fi line
clear line last_was_spaces
until line = 24
move entry line of screen to s_line
if s_line ct '^'
replace all '^' of s_line with '^^'
fi
if not no_translate
clear xcount
until xcount = 5
if s_line ct entry xcount of unprintable
replace all entry xcount of unprintable of s_line with entry xcount of translations
fi
fi xcount
fi
if suppress
if line = 23
data s_line crlf
increment lines_this_page
else
if s_line ct spaces_78
move true to last_was_spaces
else
if last_was_spaces and s_line sw vbar
combine vbar 78 vbar into space_line
data space_line crlf
increment lines_this_page
fi
data s_line crlf
increment lines_this_page
clear last_was_spaces
fi
fi
else
data s_line crlf
increment lines_this_page
fi
fi line
if lines_this_page > saftey
increment pages
if form_feeds
data ^l crlf
else
until lines_this_page >= toapage
data crlf
fi lines_this_page
fi
clear lines_this_page
fi
dspace
move display to act_space
if act_space < work_space
screen 1
forms printscr.ovr
screen 0
put no-space
forms scrman.ovr
move true to quit
move true to partial
fi
fi
fi count
endtask
@video
@nf manprint
@acceptfk f10
@dim
@logical
@num min40,max99
@logical
@head left,PRINTSCR.TSK
@head right,'Taskmaster (c) FmP 1991'
@head centre,'Taskmaster Manual Extraction'
@colour page,cyan,blue
@banner
@border
This task takes forms from SCRMAN.OVR and displays them on the screen
then reads the screen and writes the contents to SCRMAN.MAN. The
output file is ~100k in size.
In order to save paper consecutive blank lines found in the screens can
be discarded:
Do you wish to discard duplicate blank lines? [Y]
The task paginates the output:
How many lines do you want on each page? [66] 40-99
Use form-feed characters to eject pages? [N]
The pagination is not very sophisticated and may throw pages in places
where it doesn't need to. The task gives you the chance to view the
output file with LIST which can also be used for printing.
@translate
@MAP #,9C
Please note that the documentation produced is not as comprehensive or
as readable as that in the printed manual which costs #20.
@bright
@use 'Press F10 to abandon'
@end
@nf graph
@acceptfk esc,f2
@head centre,'Graphics characters'
@colour page,cyan,blue
@banner
@border
@str min1
@str min1
@str min1
@str min1
@str min1
The printout will contain some characters that your printer may not be
able to easily print (notably and ) for this reason you may
wish to use other characters to represent these. Please specify the
characters to be used (else press F2 to leave them as they are).
for use [U]
for use [D]
for use [L]
for use [R]
for use [<]
Press to translate as per the entries above;
Press f2 to prevent translation;
Press f10 to quit PRINTSCR
Please note that the printer will need to be able to print the IBM
graphics character set to print the file successfully.
@end
@nf no_tmman
@colour char,white,red
@dim
@win line4,column20,depth16,width42
@out white
PRINTSCR-Error:
PRINTSCR requires access to the forms
file for the on-line manual. This file
is called SCRMAN.OVR. It is not
currently available. The file is
normally created either during
installation or via OVERVIEW.TSK (you
can of course also create it manually
with SCR).
To create the file from OVERVIEW select
SCRMAN from the main menu, this will
create the file and enter the
application. You may then exit and re-
run PRINTSCR.
@end
@nf break-in
@bright
@colour char,white,red
@logical
@window line10,column15,depth6,width21
@drop
@out cyan
PRINTSCR
Break-in detected.
Abandon processing?
[N] enter Y or N
then press
@end
@nf no-space
@bright
@colour char,white,red
@window line10,column15,depth10,width21
@drop
@out cyan
PRINTSCR
I need more space.
Unable to proceed.
The amount of free
space is now less
than 2500 bytes.
Please make more
space and re-run.
Press any key...
@col char,cyan,blue
@end
@nf space_warn
@head centre,'Free Space'
@log
@colour page,cyan,blue
@banner
@border
This task creates an output file of upto 120k in size.
Your logged drive has less space than this.
Do you wish to proceed? [N]
@end
@eof